package com.hxzy.shop.feign.member;

import com.github.pagehelper.PageInfo;
import com.hxzy.shop.config.FeignInterceptor;
import com.hxzy.shop.dto.member.req.LabelListsReq;
import com.hxzy.shop.dto.member.req.MemberCardListsReq;
import com.hxzy.shop.dto.member.req.MemberDetailsReq;
import com.hxzy.shop.dto.member.req.MemberListsReq;
import com.hxzy.shop.dto.member.resp.LabelListsResp;
import com.hxzy.shop.dto.member.resp.MemberDetailResp;
import com.hxzy.shop.dto.member.resp.MemberLabelResp;
import com.hxzy.shop.dto.member.resp.MemberListsResp;
import com.hxzy.shop.fallback.member.MemberFallBack;
import com.hxzy.shop.vo.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @author admin
 * @Desc
 * @Date 2023/8/4
 */
@FeignClient(value = "member", configuration = FeignInterceptor.class)
public interface MemberFeign {


    /** 会员 **/

    /**
     *查看会员- 会员列表
     * @param req
     * @return
     */
    @PostMapping("/member/memberLists")
    Result<PageInfo<MemberListsResp>> memberLists(@RequestBody MemberListsReq req);

    /**
     *查看会员- 会员详细
     * @param req
     * @return
     */
    @PostMapping(value = "/member/memberDetails")
    Result<MemberDetailResp> memberDetails(@RequestBody MemberDetailsReq req);

    /** 会员卡 **/

    /**
     * 会员卡查看
     * @param req
     * @return
     */
    @PostMapping(value = "/member/memberCardLists")
    Result<Map<String,Object>> memberCardLists(@RequestBody MemberCardListsReq req);

    /**会员标签**/
    /**
     * 会员标签列表
     *
     * @param req 标签列表请求体
     * @return {@code PageInfo<LabelListsResp>}
     */
    @PostMapping("/member/labelLists")
    Result<LabelListsResp> labelLists(@RequestBody LabelListsReq req);

    /**
     * 会员标签列表
     *
     * @param req memberDetailsReq
     * @return 会员标签
     */
    @ApiOperation(value = "会员标签列表")
    @PostMapping(value = "/member/getMemberLabel")
    Result<List<MemberLabelResp>> getMemberLabel(@RequestBody MemberDetailsReq req);
}
